/**
 * \file  plugin.h
 * \brief Definition of Plugin Interface.
 *
 * ASO: Antiviral Sequence Optimizer
 * <http://aso.googlecode.com/>
 * Copyright (C) 2010 Velez Ezequiel, Peralta Andres, FuDePAN
 *
 * This file is part of the ASO project.
 *
 * Contents:       Header file for ASO providing Interface Plugin.
 *
 * System:         ASO
 * Language:       C++
 *
 * Author:         Velez Ezequiel, Peralta Andres
 * E-Mail:
 *
 * ASO is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * ASO is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with ASO.  If not, see <http://www.gnu.org/licenses/>.
 *
 */

#ifndef PLUGIN_H
#define PLUGIN_H

#include <mili/mili.h>
#include "unplugged/plugin.h"
#include "aso-core/generate_policy.h"
#include "aso-core/combinatory_policy.h"
#include "aso-core/parameter.h"
#include "aso-core/therapy.h"

typedef std::list<string> AntiviralsNames;

/*! Definicion de Plugin */
struct Plugin : public Unplugged::Plugin
{

    //TODO[C++0x] should be simplified in C++0x with inheriting ctors
    Plugin(Unplugged::LibraryHandler handle)
        : Unplugged::Plugin(handle)
    {}

    /*! Función que genera un nodo */
    virtual TherapyNode* create_node(const biopp::PseudoNucSequence& sequence, TherapyNode* parent, const AntiviralSet& av, DistanceValue value, const size_t id) = 0;
    /*! Función que retorna el valor minimo que puede tener una terapia */
    virtual Score get_min_scoring_value() const = 0;
    /*! Retorna la politica para generar el árbol */
    virtual GenerationPolicy* get_generation_policy() const = 0;
    /*! Retorna la lista de parametros a inicializar */
    virtual void get_params(ParameterList& params) = 0;
    /*! Retorna true si se valida la BD */
    virtual bool accepts_db(AVIterator avIt, AntiviralsNames& rejectedAntivirals) = 0;
    /*! Retorna el nombre del plugin */
    virtual const string& get_name() const = 0;
    /*! valida una combinación de antivirales */
    virtual bool validate_combination(const AntiviralSet& antivirals) const = 0;
    /*! Define la matriz de distancias. */
    virtual void get_distance_matrix(biopp::DistanceMatrix& matrix) const = 0;
    /*! Destructor */
    virtual ~Plugin() {};
};

#endif
